package com.example.demo.login.service.impl;

import com.example.demo.login.dao.UserDao2;
import com.example.demo.login.entity.User;
import com.example.demo.login.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service(value = "userService2")
public class UserServicelmpl implements UserService {
    @Resource
    private UserDao2 userDao2;

    @Override
    public List<User> queryByName() {
        return userDao2.queryByName();
    }

    @Override
    public User queryByName2(User user) {
        return userDao2.queryByName2(user);
    }

    @Override
    public void regist(User user) {
        userDao2.regist(user);
    }

    @Override
    public List<String> getRole(User user) {
        return userDao2.getRole(user);
    }
}
